package com.learn.security.service.impl;

import cn.hutool.core.util.StrUtil;
import com.learn.security.entity.RoleInfo;
import com.learn.security.mapper.RoleInfoMapper;
import com.learn.security.service.RoleInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author YU.TAN
 * @since 2023-06-27
 */
@Service
public class RoleInfoServiceImpl extends ServiceImpl<RoleInfoMapper, RoleInfo> implements RoleInfoService {

    @Override
    public List<RoleInfo> listRoleByUserId(Integer userId) {
        if (Objects.isNull(userId)) {
            return null;
        }
        return getBaseMapper().listRoleByUserId(userId);
    }
}
